package com.woniuxy02;

import java.util.Arrays;

/**
 * @author 作者
 * @create 2025-07-25 17:15
 */
public class Test06 {
    public static void main(String[] args) {

    }

    private static void test04() {
        String s1="abc";
        String s2="xxx";
        System.out.println(s1.concat(s2));
        System.out.println(s1);
        String s3=s1+s2;
        System.out.println(s3);
    }

    private static void test03() {
        int i=1;
        String s1 = String.valueOf(i);
        System.out.println(s1);
        String s2=i+"";
        System.out.println(s2);
    }

    private static void test02() {
        char[] chars={'a','b','c','d','e','f'};
        String s1 = new String(chars);
        String s2 = String.valueOf(chars);
        System.out.println(s1);
        System.out.println(s2);
    }

    private static void test01() {
        byte[] bytes={97,98,99};
        String str1 = new String(bytes);
        System.out.println(str1);

        String str2="abc中文";
        System.out.println(Arrays.toString(str2.getBytes()));
        System.out.println(Arrays.toString(str2.toCharArray()));
    }
}
